writing the first four terms of a sequence